package com.gy.spring.mvc.entity;

import com.baomidou.mybatisplus.enums.IdType;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import com.baomidou.mybatisplus.annotations.TableId;

import java.io.Serializable;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author geYang
 * @since 2018-03-08
 */
@ApiModel("用户描述")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID", required = true)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 用户昵称
     */
    @ApiModelProperty(value = "用户昵称", required = true)
    private String nickname;
    /**
     * 用户余额，单位分
     */
    @ApiModelProperty(value = "用户余额")
    private Integer money;

    public User() {
    }

    public User(Integer id, String nickname, Integer money) {
        this.id = id;
        this.nickname = nickname;
        this.money = money;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "User{" +
                " id=" + id +
                ", nickname=" + nickname +
                ", money=" + money +
                "}";
    }
}
